Personal tools

Lua/Events/Client/LocalPlayerBulletHit

From JC2-MP Documentation

< Lua
Jump to: navigation, search
Name    LocalPlayerBulletHit
Arguments (in table)    Player attacker, number damage, Bone bone
Return option    Return false to block damage.


Description

Fired when you're hit by a bullet. attacker is not guaranteed to exist. bone is the bone hit by a bullet.

Examples

Foo = function(args)
	local message = tostring(args.attacker).." shot you for "..tostring(args.damage).." damage!"
	Chat:Print(message, Color(255, 255, 255))
end
 
Events:Subscribe("LocalPlayerBulletHit", Foo)